/**
 * 
 */
package org.vsg.stock.core.indicator.kline;

import java.util.Date;
import java.util.List;
import java.util.Vector;

import org.vsg.stock.core.KLineStock;
import org.vsg.stock.core.kline.DailyKLineStock;

/**
 * @author Bill Vison
 *
 */
class DefaultRunningCycle extends RunningCycle {

	
	protected int length;
	
	protected List<DailyKLineStock> selectedCycleList = new Vector<DailyKLineStock>();


	void addDailyKLineStockToCycle(DailyKLineStock kline) {
		selectedCycleList.add( kline );
	}

	@Override
	Date getStartDate() {
		// TODO Auto-generated method stub
		return selectedCycleList.get(0).getDate();
	}

	@Override
	Date getEndDate() {
		// TODO Auto-generated method stub
		return selectedCycleList.get( selectedCycleList.size() - 1 ).getDate();
	}

	@Override
	int getLength() {
		return selectedCycleList.size();
	}
	
	Date ultimateDate = null;
	void setUltimateDate(Date ultimateDate) {
		this.ultimateDate = ultimateDate;
	}
	
	@Override
	Date getUltimateDate() {

		return this.ultimateDate;
	}

	@Override
	List<DailyKLineStock> getSelectedCycleList() {
		// TODO Auto-generated method stub
		return selectedCycleList;
	}
	
	
}
